package dto;

public class FileListDTO {
	private int fileNo;
	private String fileName;
	private RoomDTO room;
	private int roomNo;
	
	public FileListDTO() {
		super();
	}
	public FileListDTO(int fileNo, String fileName, RoomDTO room, int roomNo) {
		super();
		this.fileNo = fileNo;
		this.fileName = fileName;
		this.room = room;
		this.roomNo = roomNo;
	}
	public int getFileNo() {
		return fileNo;
	}
	public void setFileNo(int fileNo) {
		this.fileNo = fileNo;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public RoomDTO getRoom() {
		return room;
	}
	public void setRoom(RoomDTO room) {
		this.room = room;
	}
	public int getRoomNo() {
		return roomNo;
	}
	public void setRoomNo(int roomNo) {
		this.roomNo = roomNo;
	}
	@Override
	public String toString() {
		return "FileListDTO [fileNo=" + fileNo + ", fileName=" + fileName
				+ ", room=" + room + ", roomNo=" + roomNo + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((fileName == null) ? 0 : fileName.hashCode());
		result = prime * result + fileNo;
		result = prime * result + ((room == null) ? 0 : room.hashCode());
		result = prime * result + roomNo;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FileListDTO other = (FileListDTO) obj;
		if (fileName == null) {
			if (other.fileName != null)
				return false;
		} else if (!fileName.equals(other.fileName))
			return false;
		if (fileNo != other.fileNo)
			return false;
		if (room == null) {
			if (other.room != null)
				return false;
		} else if (!room.equals(other.room))
			return false;
		if (roomNo != other.roomNo)
			return false;
		return true;
	}
		
}
